// 导入路由模块 , Vue模块
import Vue from 'vue'
import VueRouter from 'vue-router'

// 导入路由页面组件
import Home from '@/pages/home'
import Video from '@/pages/video'
import Music from '@/pages/music'
import Mine from '@/pages/mine'
import Photo from '@/pages/photo'

// 在Vue中使用路由插件
Vue.use(VueRouter)
// 配置路由表
const routes = [
  {
    path: '/',
    component: Home
  },
  {
    path: '/video',
    component: Video
  },
  {
    path: '/music',
    component: Music
  },
  {
    path: '/mine',
    component: Mine
  },
  {
    path: '/photo',
    component: Photo
  }
]

// 创建路由实例对象
const router = new VueRouter({
  routes
})

export default router
